<template>
	<div class="index">
    <el-dialog title="设置显示的字段" :visible.sync="log" width="440px">
        <div style="padding: 10px; margin-bottom: 10px; text-align: center; background: #ecf5ff;">可拖动调整顺序</div>
        <Draggable v-model="lie" @end="ends">
          <div v-for="item in lie" :key="item.value" class="tli">
            <el-checkbox v-model="item.xianshima" style="margin-right: 20px;"></el-checkbox>
            {{item.name}}
          </div>
        </Draggable>
    	  <span slot="footer" class="dialog-footer">
          <el-button type="primary" @click="queren">确定</el-button>
    	  </span>
    </el-dialog>
	</div>
</template>

<script>
	import axios from 'axios'
	import Draggable from "vuedraggable"

	export default{
		components: {
			Draggable
		},
    props:['xianshideziduan2'],
		name: 'index',
		data(){
			return{
        log:true,
        lie:[
          {name:"总订单",value:"amount",xianshima:true,tex:""},
          {name:"待支付",value:"not_payed_amount",xianshima:true,tex:""},
          {name:"店铺原订单数",value:"yuandingdan",xianshima:true,tex:""},
          {name:"达人订单（抖音专属）",value:"star_order",xianshima:true,tex:""},
          {name:"短视频订单",value:"video_order",xianshima:true,tex:""},
          {name:"推广订单",value:"promote_order",xianshima:true,tex:""},
          {name:"自然订单",value:"ziran",xianshima:true,tex:""},
          {name:"自然订单占比",value:"ziranlv",xianshima:true,tex:""},
          {name:"发货订单",value:"deliver_amount",xianshima:true,tex:""},
          {name:"发货率",value:"fahuolv",xianshima:true,tex:""},
          {name:"开卡失败",value:"fail_amount",xianshima:true,tex:""},
          {name:"退款成功",value:"refund_amount",xianshima:true,tex:""},
          {name:"已发货交易额",value:"deliver_money_amount",xianshima:true,tex:""},
          {name:"其他费用（自己填写）",value:"other_cost",xianshima:true,tex:""},
          {name:"推广费用（自己填）",value:"promote_cost",xianshima:true,tex:""},
          {name:"发货成本",value:"fahuochengben",xianshima:true,tex:""},
          {name:"总激活量",value:"active_amount",xianshima:true,tex:""},
          {name:"仅激活量",value:"only_active_amount",xianshima:true,tex:""},
          {name:"激活且充值",value:"recharge_amount",xianshima:true,tex:""},
          {name:"总交易额",value:"sum_pay_amount",xianshima:true,tex:""},
          {name:"待开卡",value:"to_open_card_amount",xianshima:true,tex:""},
          {name:"待发货",value:"to_deliver_card_amount",xianshima:true,tex:""},
          {name:"激活成本",value:"jihuochengben",xianshima:true,tex:""},
          {name:"激活率按总订单",value:"jihuolvandingdan",xianshima:true,tex:""},
          {name:"激活率按发货",value:"jihuolvanfahuo",xianshima:true,tex:""},
          {name:"激活率/已支付",value:"jihuolvyizhifu",xianshima:true,tex:""},
          {name:"激活率/未支付",value:"jihuolvweizhifu",xianshima:true,tex:""},
          // {name:"已支付发货率",value:"fahuolvyizhifu",xianshima:true,tex:""},
          // {name:"观看成交率（快手）",value:"deal_rate",xianshima:true,tex:""},
          
          // {name:"已支付",value:"payed_amount",xianshima:true,tex:""},
          // {name:"订单来源",value:"source",xianshima:true,tex:""},
        ]
			}
		},
		created() {
      if(this.xianshideziduan2 != ''){
        this.lie = JSON.parse(JSON.stringify(this.xianshideziduan2))
      }
		},
		methods:{
      ends:function(){

      },
      queren:function(){
        this.$emit('xianshideshuju',this.lie)
        this.$nextTick(()=>{
          this.$emit('tuozhuaishowclose')
        })
      }
		}
	}
</script>

<style lang="scss" scoped>
	.index{
    /deep/ .el-dialog__body{ padding-top: 0;}
    .tli{padding: 10px 40px; font-size: 14px;  display: flex; align-items: center; cursor: pointer;
      &:hover{ background: url('../../../../static/kuanping/diandian.png') no-repeat #eaeaea 10px center; background-size: 10px;}
    }
    /deep/ .sortable-chosen{ background: #eef7ff;}
	}
</style>
